Published on

Daily Interest Calculation

Authors

Daily Interest Calculation

Overview

This guide provides a detailed explanation of how to calculate daily interest on the protocol for each lender in a given borrower pool. The goal is to determine the total amount owed and the total interest accrued over time.

Example with interest overtime breakdown

Definitions

  1. Annual Percentage Rate (APR): The yearly interest rate expressed as a percentage.
  2. Daily Rate: The daily interest rate calculated from the APR.
  3. Investment Amount: The amount of money each lender contributes to the loan.
  4. Total Loan Amount: The sum of the initial loan amount and the accrued interest over time.
  5. Total Amount Owed to Date: Sum of the initial loan amount and all accrued daily interest.
  6. Total Interest Accrued to Date: Sum of daily interests accrued over the period.
  7. Liquidation Point: Governance-driven % that represents the maximum allowed LTV at any given point
  8. Investment APR: Investment Amount / Requested Amount * Max Tier Interest Rate
Max Investment APR=Investment AmountRequested Amount×Max Tier Interest Rate\text {Max Investment APR} = \frac{\text{Investment Amount}}{\text{Requested Amount}} \times \text {Max Tier Interest Rate}
  1. Loan-to-Value (LTV) Ratio: The ratio of the loan amount to the collateral value.
LTV=(Collateral ValueRequested Amount)×100{LTV} = \left( \frac{\text{Collateral Value}}{\text{Requested Amount}} \right) \times 100

Formulas

  1. Convert APR to Daily Rate: Daily Rate=365APR

    Daily Rate=APR365\text {Daily Rate} = \frac{\text{APR}}{365}

  2. Calculate Daily Interest: Daily Interest = Investment Amount × Daily Rate

    Daily Interest=Investment Amount×Daily Rate\text {Daily Interest}= \text {Investment Amount} × \text {Daily Rate}

  3. Accumulate Daily Interest:Total Daily Interest=∑(Daily Interest for each Lender)

    Total Daily Interest=(Daily Interest for each Lender)\text{Total Daily Interest}=∑ (\text{Daily Interest for each Lender})

  4. Update Total Loan

    New Total Loan Amount=Previous Loan Amount+Total Daily Interest\text {New Total Loan Amount}=\text {Previous Loan Amount}+ \text {Total Daily Interest}

  5. Recalculate LTV

    LTV=(Total Loan AmountCollateral Value)×100\text{LTV} = \left( \frac{\text{Total Loan Amount}}{\text{Collateral Value}} \right) \times 100

Example Calculations

Initial Loan Details

  • Collateral Value: $10,000
  • Requested Amount: $5,000
  • Initial LTV: 50%
  • Total Pool APR: 70%

Lender Contributions and APRs

  • Lender X:

    • Investment Amount: $2,000
    • APR: 28% (Max → )
    • Daily Rate: 283650.0767\frac {28}{365} \approx 0.0767
    • Daily Interest: \text {2000×0.000767}≈\1.5342000$
  • Lender Y:

    • Investment Amount: $1,500
    • APR: 21%
    • Daily Rate: 213650.0575\frac {21}{365} \approx 0.0575
    • Daily Interest: \text {1500×0.000575}≈\0.8625$
  • Lender Z:

    • Investment Amount: $1,500
    • APR: 21%
    • Daily Rate: 213650.0575\frac {21}{365} \approx 0.0575
    • Daily Interest: \text {1500×0.000575}≈\0.8625$

    Total Daily Interest

    \text{Total Daily Interest} = \1.534 + $0.8625 + $0.8625 = $3.259$

    Daily Calculation Process

    1. Day 1:
      • Previous Loan Amount: $5,000

      • Total Daily Interest: $3.259

      • New Total Loan Amount: 5,000+5,000 + 3.259 = $5,003.26

      • New LTV:

        (5003.2610000)×10050.03%\left( \frac{5003.26}{10000} \right) \times 100 \approx 50.03\%

    2. Day 2:
      • Previous Loan Amount: $5,003.26
      • Total Daily Interest: $3.259
      • New Total Loan Amount: 5,003.26+5,003.26 + 3.259 = $5,006.52
      • New LTV: (5006.5210000)×10050.07%\left( \frac{5006.52}{10000} \right) \times 100 \approx 50.07\%
    3. Continue Daily Calculation:
      • Adding the total daily interest to the previous loan amount and recalculating the LTV until it reaches 100% (Or liquidation point defined by the Governance)